import request from '@/utils/request'

//设备信息
export function getDeviceDetail(data) {
    return request({
        url: '/thing/device/getDeviceDetail',
        'method': 'GET',
        params:data
    })
}
//设备列表
export function buildingDevicePage(data) {
    return request({
        url: '/thing/building-device/page',
        'method': 'GET',
        params:data
    })
}

//删除设备信息
export function deviceDelete(data) {
    return request({
        url: '/thing/building-device/delete',
        'method': 'DELETE',
        params:data
    })
}
//
//更新设备信息
export function updateDevice(data) {
    return request({
        url: '/thing/building-device/update',
        'method': 'PUT',
        'data':data
    })
}
//设备汇总信息
export function getDeviceSlaveCount(data) {
    return request({
        url: '/thing/building-device/getDeviceSlaveCount',
        'method': 'GET',
        params:data
    })
}

//设备具体信息
export function getInstanceInfo(data) {
    return request({
        url: '/thing/building-device/getInstanceInfo',
        'method': 'GET',
        params:data
    })
}

//探测器详情
export function buildingDeviceGetSlave(data) {
    return request({
        url: '/thing/device/getSlave',
        'method': 'GET',
        params:data
    })
}

//探测器详情 修改
export function buildingDeviceUpdate(data) {
    return request({
        url: '/thing/building-device/updateSlave',
        'method': 'PUT',
        'data':data
    })
}

//设备日志信息
export function buildingDeviceLog(data) {
    return request({
        url: '/thing/building-device/logPage',
        'method': 'GET',
        params:data
    })
}

//设备历史日志信息
export function buildingDeviceHistoryPage(data) {
    return request({
        url: '/thing/building-device/historyPage',
        'method': 'GET',
        params:data
    })
}
//新增设备
export function buildingDeviceCreate(data) {
    return request({
        url: '/thing/building-device/create',
        'method': 'post',
        'data': data
    })
}


